package cn.ilovese.collect.vo.file;

import cn.ilovese.collect.po.file.File;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;

@NoArgsConstructor
@Data
public class FileVO {
    private Integer id;

    private Integer taskId;

    private String url;

    private String type;

    private String size;

    private Integer kind;

    private String name;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getTaskId() {
        return taskId;
    }

    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url == null ? null : url.trim();
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type == null ? null : type.trim();
    }

    public Integer getKind() {
        return kind;
    }

    public void setKind(Integer kind) {
        this.kind = kind;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public FileVO(@NonNull File file){
        id=file.getId();
        taskId=file.getTaskId();
        url=file.getUrl();
        type=file.getType();
        size=file.getSize();
        kind=file.getKind();
        name=file.getName();
    }
}